home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / AtomList.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  90 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.  
  16.     File: AtomList.h
  17.  
  18.     Description:
  19.     
  20.     A subclass of List designed to hold NXAtoms.  This is accomplished simply by casting everything as id's, and making certain that certain methods that must operate on objects don't get used.
  21.         
  22.     Original Author: Jeremy Slade
  23.  
  24.     Revision History:
  25.         Created
  26.             V.101    JGS    Fri Mar 12 23:51:47 GMT-0700 1993
  27.  
  28. */
  29.  
  30. #ifndef AtomList_h
  31. #define AtomList_h
  32.  
  33. #define AtomList_VERSION        (101)
  34.  
  35.  
  36. #import <objc/List.h>
  37. #import <objc/hashtable.h>
  38.  
  39.  
  40.  
  41. @interface AtomList : List
  42. {}
  43.  
  44. // Creating, Initializing
  45. + initialize;
  46. - initCount:(unsigned)num;
  47. - free;
  48.  
  49. // Manipulating Atoms by index
  50. - insertAtom:(NXAtom)a at:(unsigned)index;
  51. - addAtom:(NXAtom)a;
  52. - addAtomAlphabetically:(NXAtom)a;
  53. - removeAtomAt:(unsigned)index;
  54. - removeLastAtom;
  55. - replaceAtomAt:(unsigned)index with:(NXAtom)newA;
  56. - (NXAtom)atomAt:(unsigned)index;
  57. - (NXAtom)lastAtom;
  58. - (unsigned)count;
  59.  
  60. // Manipulating Atoms by Pointer
  61. - addAtomIfAbsent:(NXAtom)a;
  62. - removeAtom:(NXAtom)a;
  63. - (unsigned)indexOfAtom:(NXAtom)a;
  64.  
  65. // Archiving
  66. - awake;
  67. - read:(NXTypedStream *)stream;
  68. - write:(NXTypedStream *)stream;
  69.  
  70. // Methods that should not be used with NXAtoms
  71. // - insertObject:obj at:(unsigned)index;
  72. // - addObject:obj;
  73. // - removeObjectAt:(unsigned)index;
  74. // - removeLastObject;
  75. // - replaceObjectAt:(unsigned)index with:obj;
  76. // - objectAt:(unsigned)index;
  77. // - lastObject;
  78. // - addObjectIfAbsent:obj;
  79. // - removeObject:obj;
  80. // - (unsigned)indexOf:obj;
  81. // - freeObjects;
  82. // - makeObjectsPerform:(SEL)sel;
  83. // - makeObjectsPerform:(SEL)sel with:obj;
  84.  
  85. @end
  86.  
  87.  
  88. #endif // AtomList_h
  89.  
  90.